package com.zzb.framework.common;

import com.baomidou.mybatisplus.annotations.*;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.lang.reflect.ParameterizedType;
import java.util.Date;

/**
 * 基本实体
 * Created by 瑱彬 on 2016/9/18.
 */
public abstract class BaseEntity<PK extends Serializable> implements Serializable {
    private static final transient long serialVersionUID = 1L;
    @TableField(value = "creator")
    private String creator;
    @TableField(value = "updater")
    private String updater;
    @TableField(value = "create_time")
    private Date createTime;
    @TableField(value = "update_time")
    private Date updateTime;
    @TableField(value = "activate")
//    @TableLogic(value = "1",delval = "0")
    private Integer activate;
    @TableField(value = "operation_version")
    @Version
    private long operationVersion;

    public long getOperationVersion() {
        return operationVersion;
    }

    public void setOperationVersion(long operationVersion) {
        this.operationVersion = operationVersion;
    }

    public String getCreator() {
        return creator;
    }
    public void setCreator(String creator) {
        this.creator = creator;
    }
    public String getUpdater() {
        return updater;
    }
    public void setUpdater(String updater) {
        this.updater = updater;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getUpdateTime() {
        return updateTime;
    }
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
    public Integer getActivate() {
        return activate;
    }
    public void setActivate(Integer activate) {
        this.activate = activate;
    }
    public abstract PK getId();
    public abstract void setId(PK id);


}
